



namespace PokerServerWebService.DataContracts
{
    /// <summary>
    /// Dane gracza
    /// </summary>
    [System.Runtime.Serialization.DataContract(Namespace = "http://WCF.DataContracts/2007/12", Name = "PokerPlayer")]
    public class PokerPlayer {

        public int HandPoints;

		private int iD;
		private Card card1;
		private Card card2;
		private ActionList status;
		private int actualBet;
		private int money;
        private int chair_nr;
        private string name;



        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="player"></param>
        /// <param name="type"> if true we hide other players cards else we copy everthing</param>
        public PokerPlayer(PokerPlayer player,bool type)
        {
            if (type)
            {
                iD = player.iD;
                actualBet = player.actualBet;
                money = player.money;
                status = player.status;
                chair_nr = player.chair_nr;
                name = player.name;
            }
            else
            {
                iD = player.iD;
                actualBet = player.actualBet;
                money = player.money;
                status = player.status;
                name = player.name;
                card1 = player.card1;
                card2 = player.card2;
                chair_nr = player.chair_nr;
            }
        }

        public PokerPlayer()
        {
     
        }

        [System.Runtime.Serialization.DataMemberAttribute(IsRequired = false, Name = "ID", Order = 0)]
        public int ID{
			get{
				return iD;
			}
			set{
				iD = value;
			}
		}

        [System.Runtime.Serialization.DataMemberAttribute(IsRequired = false, Name = "Chair_number", Order = 1)]
        public int Chair_number
        {
            get { return chair_nr; }
            set{chair_nr=value;}
        }

        [System.Runtime.Serialization.DataMemberAttribute(IsRequired = false, Name = "Card1", Order = 2)]
        public Card Card1{
			get{
				return card1;
			}
			set{
				card1 = value;
			}
		}

        [System.Runtime.Serialization.DataMemberAttribute(IsRequired = false, Name = "Card2", Order = 3)]
        public Card Card2{
			get{
				return card2;
			}
			set{
				card2 = value;
			}
		}

        [System.Runtime.Serialization.DataMemberAttribute(IsRequired = false, Name = "Status", Order = 4)]
        public ActionList Status{
			get{
				return status;
			}
			set{
				status = value;
			}
		}

        [System.Runtime.Serialization.DataMemberAttribute(IsRequired = false, Name = "ActualBet", Order = 5)]
        public int ActualBet{
			get{
				return actualBet;
			}
			set{
				actualBet = value;
			}
		}

        [System.Runtime.Serialization.DataMemberAttribute(IsRequired = false, Name = "Money", Order = 6)]
        public int Money{
			get{
				return money;
			}
			set{
				money = value;
			}
		}

        [System.Runtime.Serialization.DataMemberAttribute(IsRequired = false, Name = "Name", Order = 7)]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

	}//end PokerPlayer

}//end namespace Client